﻿Imports System.Windows
Imports System.Windows.Controls

Namespace Views
    Partial Public Class ViewSegSelection
        Private Sub lstPossibleNonRetenue_PreviewMouseLeftButtonDown(ByVal sender As Object, ByVal e As System.Windows.Input.MouseButtonEventArgs)
            Try
                Dim lst As ListViewItem = sender
                DragDrop.DoDragDrop(sender, lst.DataContext, DragDropEffects.Copy)
            Catch ex As Exception
            End Try
        End Sub
        Private Sub lstRetenue_Drop(ByVal sender As Object, ByVal e As System.Windows.DragEventArgs)
            DirectCast(DataContext, ViewModels.ViewModelSegSelection).ajouteSegRetenue(sender, e)
        End Sub
        Private Sub lstRetenue_PreviewMouseLeftButtonDown(ByVal sender As Object, ByVal e As System.Windows.Input.MouseButtonEventArgs)
            Try
                Dim lst As ListViewItem = sender
                DragDrop.DoDragDrop(sender, lst.DataContext, DragDropEffects.Copy)
            Catch ex As Exception
            End Try
        End Sub
        Private Sub lstPossibleNonRetenue_Drop(ByVal sender As Object, ByVal e As System.Windows.DragEventArgs)
            DirectCast(DataContext, ViewModels.ViewModelSegSelection).ajouteSegPossibleNonRetenue(sender, e)
        End Sub
        Private Sub DataGrid_LoadingRow(ByVal sender As Object, ByVal e As DataGridRowEventArgs)
            e.Row.Header = (e.Row.GetIndex + 1).ToString
        End Sub

    End Class
End Namespace
